
import { request } from '@/utils/request'
// get 请求应 json post 请求用 FromData 格式

export class SupplierApi {
    /**
     * @description 获取供应商数据
     * @return {HttpResponse} result
     */
    static async supplierList(data = {}) {
        return request('/api/buyer/v1/supplier', data)
    }
    /**
    * @description 获取供应商详情
    * @return {HttpResponse} result
    */
    static async supplierInfo(data = {}) {
        return request('/api/buyer/v1/supplier/detail', data)
    }
    /**
    * @description 获取高级搜索数据
    * @return {HttpResponse} result
    */
    static async supplierSearch() {
        return request('/api/buyer/v1/supplier/query')
    }
    /**
    * @description 添加供应商
    * @return {HttpResponse} result
    */
    static async supplierAdd(data) {
        return request('/api/buyer/v1/supplier/create', data, 'POST')
    }
	
	static async supplierEdit(data) {
	    return request('/api/buyer/v1/supplier/create', data, 'POST')
	}

    static async AddToBlockList(data) {
        return request('/api/buyer/v1/supplier/blacklist', data, 'POST')
    }

    static async sendEmail(data) {
        return request('/api/buyer/v1/supplier/email/send', data)
    }

    static async addVendorToMy(data) {
        return request('/api/buyer/v1/supplier/add', data, 'POST')
    }

    static async deleteVendor(data) {
        return request('/api/buyer/v1/supplier/delete', data, 'POST')
    }

    static async importVendor(data) {
        return request('/api/buyer/v1/supplier/import', data, 'POST',)
    }
	
	static async update(data) {
	    return request('/api/buyer/v1/supplier/info/update', data, 'POST')
	}	
	
	static async deleteUploadOrder(data: {}) {
	    return request('/api/buyer/v1/sale/order/payment/delete', data, 'POST')
	}
}

